package com.yenlien.traceyun.control.entity;

import com.yenlien.traceyun.webase.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "t_control_news")
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class News extends BaseEntity {

    @Column(name = "headline", length = 80)
    private String headline;                //标题

    @Column(name = "content", length = 240)
    private String content;                 //内容

    @Column(name = "reportTime", length = 50)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @Temporal(TemporalType.TIMESTAMP)
    private Date newsTime;              //日期
}
